#ifndef KEYBOARD_H
#define KEYBOARD_H

#define ReadIO_ON_OFF GPIO_Read_Status(GPIOA0,Key_On_Off) //低电平有效
#define ReadIO_F_C GPIO_Read_Status(GPIOA0,Key_F_C)
#define ReadIO_ENcode_KEY GPIO_Read_Status(GPIOA0,Encode_KEY)

#define KeyLed_ON GPIO_Write_High(GPIOB0,IO_KeyLed);
#define KeyLed_OFF GPIO_Write_Low(GPIOB0,IO_KeyLed);

typedef struct
{
    uint8_t once1;  
    uint8_t once2;
	uint8_t once3;     
}_key_param;

typedef enum
{
    PSet_0 = 1,
    PSet_1 = 2,
    PSet_2 = 3,
    PSet_4 = 5,
    PSet_5 = 6,
    PSet_6 = 7,
    PSet_7 = 8,
}PSet_E;


extern uint8_t key_pset;
extern uint8_t key_ONOFF;
extern _key_param key_param;
extern uint8_t Prime_Enable;

void Key_IOConfig(void);
void keyboard_delay15ms(void);
void Key_Init(void);
void KeyDetection(void);
void Key_Clock(void);


#endif
